import { router } from "./index";

router.beforeEach((to, from, next) => {
  if (to.path === "/note") {
    const storedCurrentArticle = localStorage.getItem("currentArticle");
    storedCurrentArticle ? next() : next("/home");
  } else {
    next();
  }
});
